import { request } from '@/api/api.js';

export function query(name, lat, lon, distance, page, size, byDistance) {
  return request({
    url: 'api/es/product/search?page=' + page + '&size=' + size + '&name=' + name + '&lat=' + lat + '&lon=' + lon + '&byDistance=' + byDistance + '&distance=' + distance,
    method: 'get'
  })
}

export function recommend(userId, size) {
  return request({
    url: 'api/es/product/recommend?userId=' + userId + '&size=' + size,
    method: 'get'
  })
}

export default {query, recommend}